﻿<UserControl x:Class="AsfMojoUI.View.ImageDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             DataContext="{Binding Main, Source={StaticResource Locator}}">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
        
    <Grid Opacity="1" Background="{x:Null}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Rectangle Name="MainRectangle" Margin="0,0,0,0" Style="{DynamicResource DialogOverlayStyle}"/>
        <Border BorderBrush="Black">
            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                <Image Name="PreviewImage" Stretch="None" Source="{Binding Path=CurrentImageSource}"  Width="{Binding Image.PixelWidth}" Height="{Binding Image.PixelHeight}">
                    <Image.InputBindings>
                        <MouseBinding Command="{Binding Path=ShowImageDialogCommand}" MouseAction="LeftClick" />
                    </Image.InputBindings>
                </Image>
                
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
